Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify code path of DirichletBC::set #3505

Merged
merged 21 commits into from
Nov 15, 2024
Merged

Unify code path of DirichletBC::set #3505

merged 21 commits into from
Nov 15, 2024

Conversation

schnellerhase
Copy link
Contributor

Reduces code duplicity in the set functionality of the Dirichlet boundary conditions.

This also highlights, that in general the fundamental operation we need to implement to set a Dirichlet boundary condition is the one provided by the set_fn. So as long as one can define a mapping from index of Dirichlet boundary condition DOF to a coefficient value the DirichletBC::set can be defined. Meaning in the future the DircihletBC class or set function may be altered to take a general set_fn instead of a specific type that contains the values - this would follow the functional style employed by the assembly routines and allow easy extension and remove the type dispatching within the DirichletBC class.

Copy link
Member

@garth-wells garth-wells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just needs some small clarifications and simplifications.

cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
cpp/dolfinx/fem/DirichletBC.h Outdated Show resolved Hide resolved
@garth-wells garth-wells added this pull request to the merge queue Nov 15, 2024
Merged via the queue into FEniCS:main with commit 871fc27 Nov 15, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants